package org.jdemo.orm.mybatis.entity;

import org.jdemo.orm.mybatis.support.annotation.Table;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Employee
 *
 * @author longlin(longlin@cyou-inc.com)
 * @date 202014/4/16
 * @since V1.0
 */
@Table(table = "employee", idColumn = Employee.C_ID, autoIncrement = true)
public class Employee implements Serializable {
    private static final long serialVersionUID = 8074071232080633374L;

    public static final String C_ID = "id";
    public static final String C_NAME = "name";
    public static final String C_AGE = "age";

    public static final String P_ID = "id";
    public static final String P_NAME = "name";
    public static final String P_AGE = "age";

    public static final Map<String, String> FIELD_PROPERTY_MAP = new LinkedHashMap<String, String>();
    static {
        FIELD_PROPERTY_MAP.put(C_ID, P_ID);
        FIELD_PROPERTY_MAP.put(C_NAME, P_NAME);
        FIELD_PROPERTY_MAP.put(C_AGE, P_AGE);
    }

    private Integer id;
    private String name;
    private Integer age;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
